/* The gallery overlay */
#galleryOverlay {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 1000;
  background-color: #222;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: none;
  .transition(opacity 0.5s ease)
}

/* This class will trigger the animation */

#galleryOverlay.visible {
  opacity: 1 !important;
}

#gallerySlider {
  height: 100%;

  left: 0;
  top: 0;

  width: 100%;
  white-space: nowrap;
  position: fixed;
  overflow-x: visible;

  .transition(all 0.4s ease-in-out);
}

#gallerySlider .placeholder {
  position: relative;
  height: 100%;
  line-height: 1px;
  text-align: center;
  width: 100%;
  display: inline-block;
  img {
    position: relative;
    z-index: 1005;
    display: inline-block;
    max-height: 100%;
    max-width: 100%;
    vertical-align: middle;
  }
  &::after {
    .am-icon-font;
    content: @fa-var-spinner;
    .am-icon-spin;
    font-size: 24px;
    color: #eee;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    z-index: 1001;
  }
}

.pinch-zoom-container {
  z-index: 1005;
}

/* The before element moves the image halfway from the top */
/*
#gallerySlider .placeholder:before {
  content: "";
  display: inline-block;
  height: 50%;
  width: 1px;
  margin-right: -1px;
}
*/




// vertical-align
.pinch-zoom {
  img {
    position: absolute!important;
    margin: auto;
    top: 0;
    bottom: 0;
    display: block;
    left: 0;
    right: 0;
  }
}


#gallerySlider.rightSpring {
  -moz-animation: rightSpring 0.3s;
  -webkit-animation: rightSpring 0.3s;
}

#gallerySlider.leftSpring {
  -moz-animation: leftSpring 0.3s;
  -webkit-animation: leftSpring 0.3s;
}

#galleryOverlay .nav-control {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  padding: 0;
}

#galleryOverlay .nav-control li {
  display: inline-block;
  background: #CCC;
  background: rgba(255, 255, 255, 0.5);
  width: 8px;
  height: 8px;
  margin: 0 3px;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  text-indent: -9999px;
  overflow: hidden;
}

#galleryOverlay .nav-control li.nav-active {
  background: #FFF;
  background: rgba(255, 255, 255, 0.9);
}

/* Firefox Keyframe Animations */

@-moz-keyframes rightSpring {
  0% {
    margin-left: 0px;
  }
  50% {
    margin-left: -30px;
  }
  100% {
    margin-left: 0px;
  }
}

@-moz-keyframes leftSpring {
  0% {
    margin-left: 0px;
  }
  50% {
    margin-left: 30px;
  }
  100% {
    margin-left: 0px;
  }
}

/* Safari and Chrome Keyframe Animations */

@-webkit-keyframes rightSpring {
  0% {
    margin-left: 0px;
  }
  50% {
    margin-left: -30px;
  }
  100% {
    margin-left: 0px;
  }
}

@-webkit-keyframes leftSpring {
  0% {
    margin-left: 0px;
  }
  50% {
    margin-left: 30px;
  }
  100% {
    margin-left: 0px;
  }
}

/* Arrows */

#prevArrow, #nextArrow {
  border: none;
  text-decoration: none;
  color: #ccc;
  opacity: 0.5;
  cursor: pointer;
  position: absolute;
  width: 40px;
  height: 40px;
  text-align: center;

  top: 50%;
  margin-top: -20px;

  -moz-transition: opacity 0.2s ease;
  -webkit-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;

  z-index: 1010;

  &::before {
    .am-icon-font;
    content: @fa-var-chevron-circle-left;
    line-height: 40px;
    font-size: 24px;
  }
}

#prevArrow:hover, #nextArrow:hover {
  opacity: 1;
}

#prevArrow {
  left: 20px;
}

#nextArrow {
  right: 20px;
  &::before {
    content: @fa-var-chevron-circle-right;
  }
}